<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of feedback
 *
 * @author cs321ga3a
 */
class feedback extends CI_Controller{
  
    
    function loadFeedbackPage() {
            $data = array(      
            'title' => 'Feedback',
            'payload' => "",
            'view' => 'view_feedback',
			'footer_menu' => true,
        );
        
        $this->load->view('view_template', $data);
        
    }
    
    function sendFeedback() {
        $feedback = $this->input->post("feedback");
		if (!$feedback){
			echo "Feedback form empty.";
			return;
		}
        $url = kitchen_base_url()."feedback";
        $args = array(
            'content' => $feedback,
            'id' => $this->session->userdata('user_id'),
        );
        $result = $this->curl->simple_post($url, $args);  
        echo($result);
    }
    
    function index() {
        $this->loadFeedbackPage();
    }
    
    
}

?>
